<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Project FF</title>
<style type="text/css">
.login{
	width: auto;
	border: thin groove #000;
}

#title {
	padding: 50px;
}
</style>
</head>
<body bgcolor="#bbccff">
<div id="title" align="center">
<img src="/trunk/images/title.png" width="431" height="114" align="middle">
</div>

<table align="center" class="login">     
	<tr align="center">
		<td colspan="2" valign="middle" align="center">
			<div id="fb-root"></div>
				<script>
					// Load the SDK Asynchronously
					(function(d){
						var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
						if (d.getElementById(id)) {return;}
						js = d.createElement('script'); js.id = id; js.async = true;
						js.src = "//connect.facebook.net/en_US/all.js";
						ref.parentNode.insertBefore(js, ref);
					}(document));

					// Init the SDK upon load
					window.fbAsyncInit = function() {
						FB.init({
							appId      : '325010710922387', // App ID
							//channelUrl : '//WWW.YOUR_DOMAIN.COM/channel.html', // Channel File
							status     : true, // check login status
							cookie     : true, // enable cookies to allow the server to access the session
							xfbml      : true  // parse XFBML
						});

						FB.Event.subscribe('auth.login', function(response) {						
							FB.api('/me', function(response) {
								window.location.reload();
							});
						});
						
						FB.Event.subscribe('auth.authResponseChange', function(response) {
							FB.api('/me', function(response) {
								window.location.reload();
							});
							window.location = "http://www.project-ff.com/trunk/login.php";
						});		  

					}
				</script>
	  
	  <div class="fb-login-button">Login with Facebook</div>
	  </td>
	  </tr>
	  </table>
</body>
</html>